from django.conf.urls import patterns, url
from django.conf import settings
import views

urlpatterns = patterns( '',
    # url(r'^formulario/$', views.formulario, name='formulario'),
    # url( r'^formulario/(?P<formulario_nuevo>\d+)/$', views.formulario, name = 'formulario' ),
    url( r'^formulario/(?P<formulario_nuevo>\d+)/(?P<formulario_edicion_nro>\d+)/$', views.formulario, name = 'formulario' ),
    url( r'^eliminar-informe/(?P<codigo_informe>\d+)/$', views.eliminar_informe, name = 'eliminar_informe' ),
    url( r'^ajax_control_periodo_indicadores/$', views.ajax_control_periodo , name = 'ajax_control_periodo_indicadores' ),
    url( r'^ajax_control_valor/$', views.ajax_control_valor , name = 'ajax_control_valor' ),
    url( r'^administrar/$', views.administrar, name = 'administrar' ),
    url( r'^administrar/(?P<tabla>\w{0,50})/(?P<id>\w{0,50})/$', views.administrar, name = 'administrar' ),
    url( r'^edicion/(?P<tabla>\w{0,50})/(?P<id>\w{0,50})/(?P<dimension>\w{0,50})/$', views.edicion, name = 'edicion' ),
    url( r'^agregar/$', views.agregar, name = 'agregar' ),
    url( r'^%s(?P<path>.*)$' % settings.MEDIA_URL[1:], 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT} ),
    url( r'^listar_informes_anteriores/(?P<universidad_pedida>\d+)/$', views.listar_informes_anteriores, name = 'listar_informes_anteriores' ),
    url( r'^ver_informe_viejo/(?P<codigo_informe>\d+)/$', views.ver_informe_viejo, name = 'ver_informe_viejo' ),

 )
